<template>
	<view v-if="pageShow">
		<view class="mainpadding">
			<view class="titletext xiaohei flexcenter">{{dataAll.name}}</view>
			<view class="margin_top">
				<u-parse :content="dataAll.content"></u-parse>
			</view>
		</view>
		
		<view class="posibottom mainpadding">
			<view class="submitbtn" @click="jumpurl()">前往操作</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				dataAll:{},
				pageShow:false,
				listid:"",
				type:1,//1登錄操作手冊,2使用操作手冊
			}
		},
		onLoad(options) {
			this.type = options.type
			this.listid = options.id
			this.init()
		},
		methods: {
			init() {
				let url = '/api/index/czscDetail'
				httpRequest.request(url, 'GET', {
					id:this.listid
				}, false, false, true).then(res => {
					this.dataAll = res.data
					this.pageShow = true
				})
			},
			jumpurl(){
				let that = this
				// if(this.type==2){
				// 	if (!httpRequest.checkIsLogin()) {
				// 		httpRequest.toast("請登陸后查看并操作")
				// 		return false
				// 	}
				// }
				location.href = that.dataAll.url;
				// uni.navigateTo({
				// 	url:that.dataAll.url
				// })
			},
		}
	}
</script>

<style>

</style>
